#ifndef __F_SPI_H__
#define __F_SPI_H__

#ifdef __cplusplus
extern "C" {
#endif

/* Includes ------------------------------------------------------------------*/
#include "main.h"

/* USER CODE BEGIN Includes */
//#include "gpio.h"
//
//extern int line;
//extern int ampl;
//extern int hz;
//extern int value;
//extern int step;
//extern int encoder_poision_cnt;// 为脉冲计数器
//extern int encoder_dir ;//为方向
//extern int b;
//extern uint8_t ifchange;
//extern int right;
//extern int left;
/* USER CODE END Includes */

/* USER CODE BEGIN Private defines */
#define         F_SPI        SPI1;
#define  		F_SPI_CS_LOW()     						HAL_GPIO_WritePin(F_SPI_CS_GPIO_Port,F_SPI_CS_Pin, GPIO_PIN_RESET);//GPIO_ResetBits( FPGA_SPI_CS_PORT, FPGA_SPI_CS_PIN )
#define  		F_SPI_CS_HIGH()    						HAL_GPIO_WritePin(F_SPI_CS_GPIO_Port,F_SPI_CS_Pin, GPIO_PIN_SET);//GPIO_SetBits( FPGA_SPI_CS_PORT, FPGA_SPI_CS_PIN )

extern SPI_HandleTypeDef hspi1;
//void HAL_GPIO_EXTI_Falling_Callback(uint16_t GPIO_Pin);
//void freq_change(int ifadd,int step);
//void ampli_change(int ifadd,int step);
//void value_change(int line,int ifadd);
//void step_change(int ifadd);
//void delay_us(int count);
void F_SPI_SendByte(uint8_t byte);
//int ENCODER_READ(void);
/* USER CODE END Private defines */

//void MX_GPIO_Init(void);

/* USER CODE BEGIN Prototypes */

/* USER CODE END Prototypes */

#ifdef __cplusplus
}
#endif
#endif
